-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include tests in source distributions #183
base: master
Are you sure you want to change the base?
Conversation
Hey. FYI, yesterday I created a PR to test releases before we push them to PyPI. When that is merged, I'll be more confident about resuming merges and releases. I'll try to look at this PR soon. Thank you for creating it! |
Hi @tartley. If your PR works, it means tests are included so my PR would not be needed :) |
Understood, thanks for the clarification. I'll double check when I'm not meant to be doing my real job... :-) |
Apologies for being AWOL forever. Interesting to hear that you want this feature. It has been my instinct not to include tests. I shall sleep on this and reconsider. Be aware, there are changes afoot that may affect this, see #293 . |
No worries, it's not a massive problem. We (Gentoo) simply use GitHub releases instead of PyPI packages for now. Howevern, it is good practice to include tests in sdists if they aren't too large. I know Debian also relies on this to test packages. |
Thank you for the response. I confess I do not yet understand why it's good to bundle tests in sdists. If such a test fails for you, but passes for me (the only scenario when it is useful to have bundled them) then that (to my way of thinking) indicates that it's a poor test, i.e. depends on something contextual that isn't captured in the repo, breaking all the invariants I thought we relied upon - eg. to see a failing test start passing by editing something that is captured in the repo. I guess maybe when the test fails for you, it's a sign that whatever made it fail possibly ought to be something that is captured / controlled by / compensated for by something that ought to be in the repo, but isn't yet. (or it's a bad test) I'll try to think harder about how I'm wrong about this, see if I can read around it or steelman myself into understanding it. Thanks for raising the issue. |
There are many reasons for failing tests downstream. Here are a few I can think of:
The main purpose of tests for us are to make sure that we aren't shipping a broken package for some reason (points 1 and 2). But of course, we often find actual bugs that you might not have noticed (because you're not running the same Python version, because of different non-Python dependencies, etc.). All this makes the test suites very valuable to us (and indirectly to you because we can help you find bugs 😃). |
OK then. Thank you for expanding on the idea. I'll continue to educate myself about it and see whether we can incorporate it here. |
+1 for including tests in sdist (including the |
Hi,
We at Gentoo rely on PyPI tarballs to build docs and run tests, could you include them in future releases so that we don't have to use GitHub's tarballs?